<template>
	<div class="header">
		<div style="display: flex;">
		<img src="@/assets/img/mobile/origin.webp" class="logo" />
		<div class="origin">
			<p style="font-size: 1.5rem; font-family: serif;">起点笔趣网</p>
			<p style="font-size: 0.8rem;">广现集团旗下网站</p>
		</div>
		</div>
		<div class="search" @click="goSearch()">
			<img src="@/assets/img/mobile/search.png" />
		</div>
	</div>
</template>

<script>
export default {
	name: 'MobileHeader',
	data() {
		return {
			isaBool: false,				//默认不启动动画
		}
	},
	methods: {
		goSearch() {
			this.$router.push('/mobile/search')
		}
	}
}	
</script>

<style scoped>
	.header {
		width: 100%;
		height: 3.5rem;
		background-color: #a68b5b;
		display: flex;
		align-items: center;
		justify-content: space-between;
		/* position: relative; 定位的元素保留原本的位置 */
		/* position: absolute; 定位的元素抛弃原本的位置,被其他标签顶替 */
		position: fixed;
		top: 0;
		z-index: 10;
	}
	
	.header .logo {
		width: 3rem;
		height: 3rem;
		margin-left: 0.5rem;
		border-radius: 0.3rem;
	}
	
	.header .origin {
		color: white;
		margin-left: 1rem;
	}
	
	.header .menus {
		margin: 0;
		padding: 0;
		list-style: none;
		width: 55%;
		height: 100%;
		color: white;
		/* 默认显示；动画开始时，设置为隐藏状态 */
	}
	
	.header .menus a {
		width: 33.33%;
		float: left;
		height: 3.2rem;
		line-height: 3.2rem;
		text-align: center;
		color: white;
	}
	
	.header .menus .router-link-active {
		border-bottom: 0.3rem solid gold;
		color: gold;
	}
	
	.header .search {
		width: 2rem;
		height: 2rem;
		border-radius: 50%;
		border: 0.1rem solid white;
		margin-right: 0.5rem;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
</style>